package com.suzhiliang.springbootlesson.globalExceptionDeal;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2015-2019, XXX有限公司
 *
 * @ClassName: IndexController
 * @Author: xmm
 * @Date: 2019/8/21 16:31
 * @Description: 测试控制器
 * @Version 1.0
 */
@RestController
public class exceptionIndexController {

    @RequestMapping(value = "/exceptionIndex/{number}")
    public String index(@PathVariable int number){
        System.out.println(20/number);
        return "get index successfully";
    }
}
